import request from "@/api/utils/request.js";

const BASE_PREFIX = "/file";

export default {

  imageUpload(work_type, file) {
    const data = new FormData();
    data.append('file', file);
    data.append('req', JSON.stringify({
      workType: work_type
    }));
    return request({
      url: `${BASE_PREFIX}/imageUpload`,
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      method: 'POST',
      data: data
    })
  }

}